import instance from "@/utils/request";
import type { IResponse } from "@/types/types";

// 购物车
export const RequestCart = (userId:number):Promise<IResponse>=>{
  return instance({
    method:'get',
    url:'/api/cart',
    params:{
      userId
    }
  })
}


// 生成订单
export const RequestGoPay = (userId:number,productIds:string,phone:string,concats:string,address:string):Promise<IResponse>=>{
  return instance({
    method:'post',
    url:'/api/order/add',
    data:{
      userId,
      productIds,
      phone,
      concats,
      address
    }
  })
}